//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.restaurant.application.accumulategoodscoupon.support;

import com.google.common.collect.Lists;
import com.nebutown.generation.Convert;
import com.nebutown.generation.PickableBean;
import com.restaurant.application.util.ImageData;
import java.util.List;
import java.util.stream.Collectors;

public class GoodsCouponVo implements PickableBean {
    public static final String FN_GOODSNAME = "goodsName";
    public static final String FN_IMAGES = "images";
    public static final String FN_GOODSCATEGORY = "goodsCategory";
    public static final String FN_ACCESSLEVEL = "accessLevel";
    public static final String FN_ACCUMULATEPOINTS = "accumulatePoints";
    public static final String FN_GOODSDESCRIBE = "goodsDescribe";
    public static final String FN_NUMBERLIMIT = "numberLimit";
    public static final String FN_FORSELLTIME = "forSellTime";
    public static final String FN_REMOVETIME = "removeTime";
    public static final String FN_TOTALNUMBER = "totalNumber";
    public static final String FN_USESHOP = "useShop";
    public static final String FN_IMMEDIATELY = "immediately";
    public static final String FN_ENDTIME = "endTime";
    public static final List<String> FIELD_NAMES = Lists.newArrayList(new String[]{"goodsName", "images", "goodsCategory", "accessLevel", "accumulatePoints", "goodsDescribe", "numberLimit", "forSellTime", "removeTime", "totalNumber", "useShop", "immediately", "endTime"});
    private String goodsName;
    private List<ImageData> images;
    private String goodsCategory;
    private String accessLevel;
    private Long accumulatePoints;
    private String goodsDescribe;
    private Long numberLimit;
    private Long forSellTime;
    private Long removeTime;
    private Long totalNumber;
    private String useShop;
    private Boolean immediately;
    private Long endTime;

    public GoodsCouponVo(String goodsName, List<ImageData> images, String goodsCategory, String accessLevel, Long accumulatePoints, String goodsDescribe, Long numberLimit, Long forSellTime, Long removeTime, Long totalNumber, String useShop, Boolean immediately, Long endTime) {
        this.setGoodsName(goodsName);
        this.setImages(images);
        this.setGoodsCategory(goodsCategory);
        this.setAccessLevel(accessLevel);
        this.setAccumulatePoints(accumulatePoints);
        this.setGoodsDescribe(goodsDescribe);
        this.setNumberLimit(numberLimit);
        this.setForSellTime(forSellTime);
        this.setRemoveTime(removeTime);
        this.setTotalNumber(totalNumber);
        this.setUseShop(useShop);
        this.setImmediately(immediately);
        this.setEndTime(endTime);
    }

    public GoodsCouponVo() {
    }

    public GoodsCouponVo duplicate() {
        GoodsCouponVo result = new GoodsCouponVo();
        result.goodsName = this.goodsName;
        result.images = this.images == null ? null : (List)this.images.stream().map((e2) -> {
            return e2 == null ? null : e2.duplicate();
        }).collect(Collectors.toList());
        result.goodsCategory = this.goodsCategory;
        result.accessLevel = this.accessLevel;
        result.accumulatePoints = this.accumulatePoints;
        result.goodsDescribe = this.goodsDescribe;
        result.numberLimit = this.numberLimit;
        result.forSellTime = this.forSellTime;
        result.removeTime = this.removeTime;
        result.totalNumber = this.totalNumber;
        result.useShop = this.useShop;
        result.immediately = this.immediately;
        result.endTime = this.endTime;
        return result;
    }

    public String toString() {
        return Convert.toJson(this);
    }

    public String getGoodsName() {
        return this.goodsName;
    }

    public void setGoodsName(String value) {
        this.goodsName = value;
    }

    public GoodsCouponVo withGoodsName(String value) {
        this.setGoodsName(value);
        return this;
    }

    public GoodsCouponVo withGoodsName(String value, String defaultValue) {
        this.setGoodsName(value == null ? defaultValue : value);
        return this;
    }

    public List<ImageData> getImages() {
        if (this.images == null) {
            this.images = Lists.newArrayList();
        }

        return this.images;
    }

    public void setImages(List<ImageData> value) {
        this.images = value;
    }

    public GoodsCouponVo withImages(List<ImageData> value) {
        this.setImages(value);
        return this;
    }

    public GoodsCouponVo withImages(List<ImageData> value, List<ImageData> defaultValue) {
        this.setImages(value == null ? defaultValue : value);
        return this;
    }

    public GoodsCouponVo addImages(ImageData value) {
        if (this.images == null) {
            this.images = Lists.newArrayList();
        }

        this.images.add(value);
        return this;
    }

    public String getGoodsCategory() {
        return this.goodsCategory;
    }

    public void setGoodsCategory(String value) {
        this.goodsCategory = value;
    }

    public GoodsCouponVo withGoodsCategory(String value) {
        this.setGoodsCategory(value);
        return this;
    }

    public GoodsCouponVo withGoodsCategory(String value, String defaultValue) {
        this.setGoodsCategory(value == null ? defaultValue : value);
        return this;
    }

    public String getAccessLevel() {
        return this.accessLevel;
    }

    public void setAccessLevel(String value) {
        this.accessLevel = value;
    }

    public GoodsCouponVo withAccessLevel(String value) {
        this.setAccessLevel(value);
        return this;
    }

    public GoodsCouponVo withAccessLevel(String value, String defaultValue) {
        this.setAccessLevel(value == null ? defaultValue : value);
        return this;
    }

    public Long getAccumulatePoints() {
        return this.accumulatePoints;
    }

    public void setAccumulatePoints(Long value) {
        this.accumulatePoints = value;
    }

    public GoodsCouponVo withAccumulatePoints(Long value) {
        this.setAccumulatePoints(value);
        return this;
    }

    public GoodsCouponVo withAccumulatePoints(Long value, Long defaultValue) {
        this.setAccumulatePoints(value == null ? defaultValue : value);
        return this;
    }

    public String getGoodsDescribe() {
        return this.goodsDescribe;
    }

    public void setGoodsDescribe(String value) {
        this.goodsDescribe = value;
    }

    public GoodsCouponVo withGoodsDescribe(String value) {
        this.setGoodsDescribe(value);
        return this;
    }

    public GoodsCouponVo withGoodsDescribe(String value, String defaultValue) {
        this.setGoodsDescribe(value == null ? defaultValue : value);
        return this;
    }

    public Long getNumberLimit() {
        return this.numberLimit;
    }

    public void setNumberLimit(Long value) {
        this.numberLimit = value;
    }

    public GoodsCouponVo withNumberLimit(Long value) {
        this.setNumberLimit(value);
        return this;
    }

    public GoodsCouponVo withNumberLimit(Long value, Long defaultValue) {
        this.setNumberLimit(value == null ? defaultValue : value);
        return this;
    }

    public Long getForSellTime() {
        return this.forSellTime;
    }

    public void setForSellTime(Long value) {
        this.forSellTime = value;
    }

    public GoodsCouponVo withForSellTime(Long value) {
        this.setForSellTime(value);
        return this;
    }

    public GoodsCouponVo withForSellTime(Long value, Long defaultValue) {
        this.setForSellTime(value == null ? defaultValue : value);
        return this;
    }

    public Long getRemoveTime() {
        return this.removeTime;
    }

    public void setRemoveTime(Long value) {
        this.removeTime = value;
    }

    public GoodsCouponVo withRemoveTime(Long value) {
        this.setRemoveTime(value);
        return this;
    }

    public GoodsCouponVo withRemoveTime(Long value, Long defaultValue) {
        this.setRemoveTime(value == null ? defaultValue : value);
        return this;
    }

    public Long getTotalNumber() {
        return this.totalNumber;
    }

    public void setTotalNumber(Long value) {
        this.totalNumber = value;
    }

    public GoodsCouponVo withTotalNumber(Long value) {
        this.setTotalNumber(value);
        return this;
    }

    public GoodsCouponVo withTotalNumber(Long value, Long defaultValue) {
        this.setTotalNumber(value == null ? defaultValue : value);
        return this;
    }

    public String getUseShop() {
        return this.useShop;
    }

    public void setUseShop(String value) {
        this.useShop = value;
    }

    public GoodsCouponVo withUseShop(String value) {
        this.setUseShop(value);
        return this;
    }

    public GoodsCouponVo withUseShop(String value, String defaultValue) {
        this.setUseShop(value == null ? defaultValue : value);
        return this;
    }

    public Boolean getImmediately() {
        return this.immediately;
    }

    public void setImmediately(Boolean value) {
        this.immediately = value;
    }

    public GoodsCouponVo withImmediately(Boolean value) {
        this.setImmediately(value);
        return this;
    }

    public GoodsCouponVo withImmediately(Boolean value, Boolean defaultValue) {
        this.setImmediately(value == null ? defaultValue : value);
        return this;
    }

    public Long getEndTime() {
        return this.endTime;
    }

    public void setEndTime(Long value) {
        this.endTime = value;
    }

    public GoodsCouponVo withEndTime(Long value) {
        this.setEndTime(value);
        return this;
    }

    public GoodsCouponVo withEndTime(Long value, Long defaultValue) {
        this.setEndTime(value == null ? defaultValue : value);
        return this;
    }

    public Object getValueOf(String name) {
        byte var3 = -1;
        switch(name.hashCode()) {
            case -1867729624:
                if (name.equals("forSellTime")) {
                    var3 = 7;
                }
                break;
            case -1800037122:
                if (name.equals("immediately")) {
                    var3 = 11;
                }
                break;
            case -1607243192:
                if (name.equals("endTime")) {
                    var3 = 12;
                }
                break;
            case -1568146203:
                if (name.equals("accumulatePoints")) {
                    var3 = 4;
                }
                break;
            case -1185250696:
                if (name.equals("images")) {
                    var3 = 1;
                }
                break;
            case -1050364800:
                if (name.equals("accessLevel")) {
                    var3 = 3;
                }
                break;
            case -877912147:
                if (name.equals("totalNumber")) {
                    var3 = 9;
                }
                break;
            case -365755788:
                if (name.equals("goodsCategory")) {
                    var3 = 2;
                }
                break;
            case -148047587:
                if (name.equals("useShop")) {
                    var3 = 10;
                }
                break;
            case 601947201:
                if (name.equals("goodsDescribe")) {
                    var3 = 5;
                }
                break;
            case 719988210:
                if (name.equals("numberLimit")) {
                    var3 = 6;
                }
                break;
            case 1098571121:
                if (name.equals("removeTime")) {
                    var3 = 8;
                }
                break;
            case 1394404097:
                if (name.equals("goodsName")) {
                    var3 = 0;
                }
        }

        switch(var3) {
            case 0:
                return this.getGoodsName();
            case 1:
                return this.getImages();
            case 2:
                return this.getGoodsCategory();
            case 3:
                return this.getAccessLevel();
            case 4:
                return this.getAccumulatePoints();
            case 5:
                return this.getGoodsDescribe();
            case 6:
                return this.getNumberLimit();
            case 7:
                return this.getForSellTime();
            case 8:
                return this.getRemoveTime();
            case 9:
                return this.getTotalNumber();
            case 10:
                return this.getUseShop();
            case 11:
                return this.getImmediately();
            case 12:
                return this.getEndTime();
            default:
                return null;
        }
    }

    public void setValueOf(String name, Object value) {
        byte var4 = -1;
        switch(name.hashCode()) {
            case -1867729624:
                if (name.equals("forSellTime")) {
                    var4 = 7;
                }
                break;
            case -1800037122:
                if (name.equals("immediately")) {
                    var4 = 11;
                }
                break;
            case -1607243192:
                if (name.equals("endTime")) {
                    var4 = 12;
                }
                break;
            case -1568146203:
                if (name.equals("accumulatePoints")) {
                    var4 = 4;
                }
                break;
            case -1185250696:
                if (name.equals("images")) {
                    var4 = 1;
                }
                break;
            case -1050364800:
                if (name.equals("accessLevel")) {
                    var4 = 3;
                }
                break;
            case -877912147:
                if (name.equals("totalNumber")) {
                    var4 = 9;
                }
                break;
            case -365755788:
                if (name.equals("goodsCategory")) {
                    var4 = 2;
                }
                break;
            case -148047587:
                if (name.equals("useShop")) {
                    var4 = 10;
                }
                break;
            case 601947201:
                if (name.equals("goodsDescribe")) {
                    var4 = 5;
                }
                break;
            case 719988210:
                if (name.equals("numberLimit")) {
                    var4 = 6;
                }
                break;
            case 1098571121:
                if (name.equals("removeTime")) {
                    var4 = 8;
                }
                break;
            case 1394404097:
                if (name.equals("goodsName")) {
                    var4 = 0;
                }
        }

        switch(var4) {
            case 0:
                this.setGoodsName((String)value);
                return;
            case 1:
                this.setImages((List)value);
                return;
            case 2:
                this.setGoodsCategory((String)value);
                return;
            case 3:
                this.setAccessLevel((String)value);
                return;
            case 4:
                this.setAccumulatePoints((Long)value);
                return;
            case 5:
                this.setGoodsDescribe((String)value);
                return;
            case 6:
                this.setNumberLimit((Long)value);
                return;
            case 7:
                this.setForSellTime((Long)value);
                return;
            case 8:
                this.setRemoveTime((Long)value);
                return;
            case 9:
                this.setTotalNumber((Long)value);
                return;
            case 10:
                this.setUseShop((String)value);
                return;
            case 11:
                this.setImmediately((Boolean)value);
                return;
            case 12:
                this.setEndTime((Long)value);
                return;
            default:
        }
    }

    public boolean hasField(String name) {
        return FIELD_NAMES.contains(name);
    }

    public int hashCode() {
        return this.signature().hashCode();
    }

    public boolean equals(Object o) {
        return !(o instanceof GoodsCouponVo) ? false : this.signature().equals(((GoodsCouponVo)o).signature());
    }

    public String signature() {
        throw new RuntimeException("Bean GoodsCouponVo has no signature defined, no hash code or equals possible.");
    }
}
